package com.qijian.maindata.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Date;
import java.util.List;


/***
 * 列表包装类
 */
@Data
@ToString
public class ProjectProductionPlanVo{

    @ApiModelProperty("项目id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long projectId;

    @ApiModelProperty("项目号")
    private String projectNo;

    @ApiModelProperty("机台号")
    private String machineNo;

    @ApiModelProperty("步长")
    private Integer step;

    @ApiModelProperty("工单状态")
    private Boolean isDist;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "项目开始时间")
    private Date projectStartTime;

    @ApiModelProperty("工序明细")
    private List<SubItem> items;

    @Data
    public static class SubItem {
        @ApiModelProperty(value = "工序类型名")
        private String processTypeName;

        @ApiModelProperty(value = "工序类型排序号")
        private Integer typeOrder;

        /** 计划开始时间 */
        @JsonFormat(pattern = "yyyy-MM-dd")
        @ApiModelProperty(value = "计划开始时间")
        private Date startTime;

        /** 计划结束时间 */
        @JsonFormat(pattern = "yyyy-MM-dd")
        @ApiModelProperty(value = "计划结束时间")
        private Date endTime;

    }
}
